{extend name="./static/page/admin_tpl.html" /}

{block name="header_title"}大话软件后台{/block}

{block name="page_css"}
<link href="{$__TEMPLETE__}/css/admin/slide/slideList.css" rel="stylesheet">
{/block}
{block name="content"}
<div class="col-md-12 right-section">
    <!--内容区域-->
    <h3>
        幻灯片列表
        <div class="operation-div">
            <a class="btn btn-success addSlide" href="{:url('admin/Slide/addSlide');}">添加</a>
        </div>
    </h3>
    <div class="inner-section row">
        <div id="content">
            <div class="list-title">
                <div class="list-title-panel">
                    <span class="glyphicon glyphicon-list"></span>列表</span>
                </div>

            </div>
            <div class="table-content" id = "list_container">
                <table id="list-table" class="list-table table-hover table-bordered" cellspacing="0" cellpadding="0" border="0" width="100%" align="center">
                    <tbody>
                    <tr>
                        <th>名称</th>
                        <th>缩略图</th>
                        <th>链接地址</th>
                        <th>打开方式</th>
                        <th>排序</th>
                        <th>操作</th>
                    </tr>
                    {if $slideList}
                    {foreach  $slideList as $slide}
                    <tr>
                        <td>{$slide.name}</td>
                        <td><img src="{$__LOD__.$slide.thumb}" height="50"></td>
                        <td>{if $slide.url}{$slide.url}{else}无{/if}</td>
                        <td>{if $slide.target eq '0'}新开窗口{else}本页刷新{/if}</td>
                        <td>{$slide.sort}</td>
                        <td><a class="btn btn-xs btn-primary" href="{:url('admin/Slide/editSlide',['id'=>$slide.id]);}" target="_self">编辑</a><a class="btn btn-xs btn-default deleteSlide" sid="{$slide.id}">删除</a></td>
                    </tr>
                    {/foreach}
                   {else}
                    <tr><td colspan="6"><p class="text-danger">暂无数据。</p></td></tr>
                    {/if}
                    </tbody>
                </table>
            </div>

            <div class="fn-clear"></div>
            <!-- 列表底部 -->
            <div class="list-bottom">
                <div class="list-bottom-panel">
                </div>
            </div>

        </div>
        <!--分页-->
        <div id="page-selection"></div>
    </div>
</div>
{/block}
{block name="page_js"}
<script src="{$__TEMPLETE__}/js/admin/slide/slideList.js"></script>
{/block}